<?php /* Smarty version 2.6.27, created on 2019-11-04 17:54:33
         compiled from activity/add.tpl */ ?>
<?php require_once(SMARTY_CORE_DIR . 'core.load_plugins.php');
smarty_core_load_plugins(array('plugins' => array(array('modifier', 't', 'activity/add.tpl', 40, false),)), $this); ?>
<form method="post" id="form_submit" action="admin.php?ctrl=activity&act=submit&type=add">
    <table class="itable itable-color">
        <tr>
            <td width="80px">活动ID：</td>
            <td><input type="text" name="id" value="<?php echo $this->_tpl_vars['info']['id']; ?>
" onblur="checknum(this)"><span style="color: red;">*</span></td>
        </tr>
        <tr>
            <td>活动名称：</td>
            <td><input type="text" name="name" value="<?php echo $this->_tpl_vars['info']['name']; ?>
"><span style="color: red;">*</span></td>
        </tr>
        <tr>
            <td>活动配置表：</td>
            <td><textarea rows="30" cols="100" name="strcom"><?php echo $this->_tpl_vars['info']['strcom']; ?>
</textarea><span style="color: red;">*</span></td>
        </tr>
		
        <tr>
            <td>开始时间：</td>
            <td><input type="text" name="stime" value="<?php echo $this->_tpl_vars['info']['stime']; ?>
" class="datepicker"></td>
        </tr>
        <tr>
            <td>结束时间：</td>
            <td><input type="text" name="etime" value="<?php echo $this->_tpl_vars['info']['etime']; ?>
" class="datepicker"></td>
        </tr>
        <tr>
            <td>是否重置：</td>
            <td>
                <select name="repeat">
                    <option value="0" <?php if ($this->_tpl_vars['info']['repeat'] == 0): ?>selected<?php endif; ?> >否</option>
                    <option value="1" <?php if ($this->_tpl_vars['info']['repeat'] == 1): ?>selected<?php endif; ?>>是</option>
                </select>
            </td>
        </tr>
        <tr>
            <td>服务器：</td>
            <td><?php echo $this->_tpl_vars['server']; ?>
</td>
        </tr>
        <tr>
            <td></td>
            <td>
                <input type="submit" class="gbutton" value="<?php echo ((is_array($_tmp='提交')) ? $this->_run_mod_handler('t', true, $_tmp) : t($_tmp)); ?>
"/>
                <input type="reset"  class="gbutton" value="<?php echo ((is_array($_tmp='重置')) ? $this->_run_mod_handler('t', true, $_tmp) : t($_tmp)); ?>
"/>
            </td>
        </tr>
    </table>
</form>

<script type="text/javascript">
    $('.datepicker').datetimepicker(timepickerlang);

    $('#form_submit').ajaxForm({
        complete: function(xhr) {
            var result = xhr.responseText;
            $('#form_submit reset').trigger('click');
            if(result == 'success'){
                $tabs.tabs("select", 0);
            }else{
                $.dialog.alert(result);
            }

        }
    });

    function checknum(elem) {
        if (elem.value && elem.value != parseInt(elem.value))
            elem.value = ''
    }
</script>